﻿using System;
using System.Windows;
using SilverMindMap.Core.Model;

namespace SilverMindMap.Core.View
{
    public interface ILayoutProvider
    {
        
        Point GetNodePosition(Node node);
        event EventHandler<NodePositionChangedEventArgs> NodePositionChanged;
    }

    public class NodePositionChangedEventArgs : EventArgs
    {
        private readonly Node _node;
        private readonly Point _newPosition;

        public NodePositionChangedEventArgs(Node node, Point newPosition)
        {
            Guard.ArgumentNotNull(node, "node");
            _node = node;
            _newPosition = newPosition;
        }

        public Node Node
        {
            get { return _node; }
        }

        public Point NewPosition
        {
            get { return _newPosition; }
        }
    }
}
